/**
* Created by ren on 2017/1/3.
*/
<template>
  <div class='paySuccess page-wrap'>
    <Nav></Nav>
    <div class="container">
      <div class="paysuccess page">
        <img src="../../assets/success.png" style="margin-top: 126px">
        <div style="margin-top: 49px;font-size: 20px;margin-bottom: 120px">恭喜您，已支付成功！</div>
        <div class="btns" v-if="orderNo!==''">
          <router-link :to="{name:'moreGoods'}">
            <button class="btn" style="margin-right: 100px">查看详情</button>
          </router-link>
          <button class="btn" @click="sendredpack">发送红包</button>
        </div>
        <div v-else style="height: 100px">

        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import Nav from '../Nav'
  export default {
    name: 'paySuccess',
    data: function () {
      return {
        orderNo: ''
      }
    },
    components: {
      Nav
    },
    methods: {
      sendredpack: function () {
        this.$router.push({name: 'share', params: {orderNo: this.$cookie.get('redpack_orderNo')}})
      }
    },
    mounted () {
      this.orderNo = this.$cookie.get('redpack_orderNo')
    }
  }
</script>
